#![allow(unused_imports, non_snake_case, non_camel_case_types)]
use super::windows::*;
use super::*;

#[repr(C)]
pub struct IDWriteFactoryVtbl {
	pub parent: IUnknownVtbl,
	pub GetSystemFontCollection: unsafe extern "system" fn(This: *mut IDWriteFactory, fontCollection: *mut *mut IDWriteFontCollection, checkForUpdates: BOOL) -> HRESULT,
	pub CreateCustomFontCollection: unsafe extern "system" fn(This: *mut IDWriteFactory, collectionLoader: *mut IDWriteFontCollectionLoader, collectionKey: *const c_void, collectionKeySize: UINT32, fontCollection: *mut *mut IDWriteFontCollection) -> HRESULT,
	pub RegisterFontCollectionLoader: unsafe extern "system" fn(This: *mut IDWriteFactory, fontCollectionLoader: *mut IDWriteFontCollectionLoader) -> HRESULT,
	pub UnregisterFontCollectionLoader: unsafe extern "system" fn(This: *mut IDWriteFactory, fontCollectionLoader: *mut IDWriteFontCollectionLoader) -> HRESULT,
	pub CreateFontFileReference: unsafe extern "system" fn(This: *mut IDWriteFactory, filePath: *const WCHAR, lastWriteTime: *const FILETIME, fontFile: *mut *mut IDWriteFontFile) -> HRESULT,
	pub CreateCustomFontFileReference: unsafe extern "system" fn(This: *mut IDWriteFactory, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, fontFileLoader: *mut IDWriteFontFileLoader, fontFile: *mut *mut IDWriteFontFile) -> HRESULT,
	pub CreateFontFace: unsafe extern "system" fn(This: *mut IDWriteFactory, fontFaceType: DWRITE_FONT_FACE_TYPE, numberOfFiles: UINT32, fontFiles: *const *mut IDWriteFontFile, faceIndex: UINT32, fontFaceSimulationFlags: DWRITE_FONT_SIMULATIONS, fontFace: *mut *mut IDWriteFontFace) -> HRESULT,
	pub CreateRenderingParams: unsafe extern "system" fn(This: *mut IDWriteFactory, renderingParams: *mut *mut IDWriteRenderingParams) -> HRESULT,
	pub CreateMonitorRenderingParams: unsafe extern "system" fn(This: *mut IDWriteFactory, monitor: HMONITOR, renderingParams: *mut *mut IDWriteRenderingParams) -> HRESULT,
	pub CreateCustomRenderingParams: unsafe extern "system" fn(This: *mut IDWriteFactory, gamma: FLOAT, enhancedContrast: FLOAT, clearTypeLevel: FLOAT, pixelGeometry: DWRITE_PIXEL_GEOMETRY, renderingMode: DWRITE_RENDERING_MODE, renderingParams: *mut *mut IDWriteRenderingParams) -> HRESULT,
	pub RegisterFontFileLoader: unsafe extern "system" fn(This: *mut IDWriteFactory, fontFileLoader: *mut IDWriteFontFileLoader) -> HRESULT,
	pub UnregisterFontFileLoader: unsafe extern "system" fn(This: *mut IDWriteFactory, fontFileLoader: *mut IDWriteFontFileLoader) -> HRESULT,
	pub CreateTextFormat: unsafe extern "system" fn(This: *mut IDWriteFactory, fontFamilyName: *const WCHAR, fontCollection: *mut IDWriteFontCollection, fontWeight: DWRITE_FONT_WEIGHT, fontStyle: DWRITE_FONT_STYLE, fontStretch: DWRITE_FONT_STRETCH, fontSize: FLOAT, localeName: *const WCHAR, textFormat: *mut *mut IDWriteTextFormat) -> HRESULT,
	pub CreateTypography: unsafe extern "system" fn(This: *mut IDWriteFactory, typography: *mut *mut IDWriteTypography) -> HRESULT,
	pub GetGdiInterop: unsafe extern "system" fn(This: *mut IDWriteFactory, gdiInterop: *mut *mut IDWriteGdiInterop) -> HRESULT,
	pub CreateTextLayout: unsafe extern "system" fn(This: *mut IDWriteFactory, string: *const WCHAR, stringLength: UINT32, textFormat: *mut IDWriteTextFormat, maxWidth: FLOAT, maxHeight: FLOAT, textLayout: *mut *mut IDWriteTextLayout) -> HRESULT,
	pub CreateGdiCompatibleTextLayout: unsafe extern "system" fn(This: *mut IDWriteFactory, string: *const WCHAR, stringLength: UINT32, textFormat: *mut IDWriteTextFormat, layoutWidth: FLOAT, layoutHeight: FLOAT, pixelsPerDip: FLOAT, transform: *const DWRITE_MATRIX, useGdiNatrual: BOOL, textLayout: *mut *mut IDWriteTextLayout) -> HRESULT,
	pub CreateEllipsisTrimmingSign: unsafe extern "system" fn(This: *mut IDWriteFactory, textFormat: *mut IDWriteTextFormat, trimmingSign: *mut *mut IDWriteInlineObject) -> HRESULT,
	pub CreateTextAnalyzer: unsafe extern "system" fn(This: *mut IDWriteFactory, textAnalyzer: *mut *mut IDWriteTextAnalyzer) -> HRESULT,
	pub CreateNumberSubstitution: unsafe extern "system" fn(This: *mut IDWriteFactory, substitutionMethod: DWRITE_NUMBER_SUBSTITUTION_METHOD, localeName: *const WCHAR, ignoreUserOverride: BOOL, numberSubstitution: *mut *mut IDWriteNumberSubstitution) -> HRESULT,
	pub CreateGlyphRunAnalysis: unsafe extern "system" fn(This: *mut IDWriteFactory, glyphRun: *const DWRITE_GLYPH_RUN, pixelsPerDip: FLOAT, transform: *const DWRITE_MATRIX, renderingMode: DWRITE_RENDERING_MODE, measuringMode: DWRITE_MEASURING_MODE, baselineOriginX: FLOAT, baselineOriginY: FLOAT, glyphRunAnalysis: *mut *mut IDWriteGlyphRunAnalysis) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteFactory {
	pub lpVtbl: *const IDWriteFactoryVtbl,
}
impl IDWriteFactory {
	#[inline]
	pub unsafe fn GetSystemFontCollection(&self, fontCollection: *mut *mut IDWriteFontCollection, checkForUpdates: BOOL) -> HRESULT {
		((*self.lpVtbl).GetSystemFontCollection)(self as *const _ as *mut _, fontCollection, checkForUpdates)
	}
	#[inline]
	pub unsafe fn CreateCustomFontCollection(&self, collectionLoader: *mut IDWriteFontCollectionLoader, collectionKey: *const c_void, collectionKeySize: UINT32, fontCollection: *mut *mut IDWriteFontCollection) -> HRESULT {
		((*self.lpVtbl).CreateCustomFontCollection)(self as *const _ as *mut _, collectionLoader, collectionKey, collectionKeySize, fontCollection)
	}
	#[inline]
	pub unsafe fn RegisterFontCollectionLoader(&self, fontCollectionLoader: *mut IDWriteFontCollectionLoader) -> HRESULT {
		((*self.lpVtbl).RegisterFontCollectionLoader)(self as *const _ as *mut _, fontCollectionLoader)
	}
	#[inline]
	pub unsafe fn UnregisterFontCollectionLoader(&self, fontCollectionLoader: *mut IDWriteFontCollectionLoader) -> HRESULT {
		((*self.lpVtbl).UnregisterFontCollectionLoader)(self as *const _ as *mut _, fontCollectionLoader)
	}
	#[inline]
	pub unsafe fn CreateFontFileReference(&self, filePath: *const WCHAR, lastWriteTime: *const FILETIME, fontFile: *mut *mut IDWriteFontFile) -> HRESULT {
		((*self.lpVtbl).CreateFontFileReference)(self as *const _ as *mut _, filePath, lastWriteTime, fontFile)
	}
	#[inline]
	pub unsafe fn CreateCustomFontFileReference(&self, fontFileReferenceKey: *const c_void, fontFileReferenceKeySize: UINT32, fontFileLoader: *mut IDWriteFontFileLoader, fontFile: *mut *mut IDWriteFontFile) -> HRESULT {
		((*self.lpVtbl).CreateCustomFontFileReference)(self as *const _ as *mut _, fontFileReferenceKey, fontFileReferenceKeySize, fontFileLoader, fontFile)
	}
	#[inline]
	pub unsafe fn CreateFontFace(&self, fontFaceType: DWRITE_FONT_FACE_TYPE, numberOfFiles: UINT32, fontFiles: *const *mut IDWriteFontFile, faceIndex: UINT32, fontFaceSimulationFlags: DWRITE_FONT_SIMULATIONS, fontFace: *mut *mut IDWriteFontFace) -> HRESULT {
		((*self.lpVtbl).CreateFontFace)(self as *const _ as *mut _, fontFaceType, numberOfFiles, fontFiles, faceIndex, fontFaceSimulationFlags, fontFace)
	}
	#[inline]
	pub unsafe fn CreateRenderingParams(&self, renderingParams: *mut *mut IDWriteRenderingParams) -> HRESULT {
		((*self.lpVtbl).CreateRenderingParams)(self as *const _ as *mut _, renderingParams)
	}
	#[inline]
	pub unsafe fn CreateMonitorRenderingParams(&self, monitor: HMONITOR, renderingParams: *mut *mut IDWriteRenderingParams) -> HRESULT {
		((*self.lpVtbl).CreateMonitorRenderingParams)(self as *const _ as *mut _, monitor, renderingParams)
	}
	#[inline]
	pub unsafe fn CreateCustomRenderingParams(&self, gamma: FLOAT, enhancedContrast: FLOAT, clearTypeLevel: FLOAT, pixelGeometry: DWRITE_PIXEL_GEOMETRY, renderingMode: DWRITE_RENDERING_MODE, renderingParams: *mut *mut IDWriteRenderingParams) -> HRESULT {
		((*self.lpVtbl).CreateCustomRenderingParams)(self as *const _ as *mut _, gamma, enhancedContrast, clearTypeLevel, pixelGeometry, renderingMode, renderingParams)
	}
	#[inline]
	pub unsafe fn RegisterFontFileLoader(&self, fontFileLoader: *mut IDWriteFontFileLoader) -> HRESULT {
		((*self.lpVtbl).RegisterFontFileLoader)(self as *const _ as *mut _, fontFileLoader)
	}
	#[inline]
	pub unsafe fn UnregisterFontFileLoader(&self, fontFileLoader: *mut IDWriteFontFileLoader) -> HRESULT {
		((*self.lpVtbl).UnregisterFontFileLoader)(self as *const _ as *mut _, fontFileLoader)
	}
	#[inline]
	pub unsafe fn CreateTextFormat(&self, fontFamilyName: *const WCHAR, fontCollection: *mut IDWriteFontCollection, fontWeight: DWRITE_FONT_WEIGHT, fontStyle: DWRITE_FONT_STYLE, fontStretch: DWRITE_FONT_STRETCH, fontSize: FLOAT, localeName: *const WCHAR, textFormat: *mut *mut IDWriteTextFormat) -> HRESULT {
		((*self.lpVtbl).CreateTextFormat)(self as *const _ as *mut _, fontFamilyName, fontCollection, fontWeight, fontStyle, fontStretch, fontSize, localeName, textFormat)
	}
	#[inline]
	pub unsafe fn CreateTypography(&self, typography: *mut *mut IDWriteTypography) -> HRESULT {
		((*self.lpVtbl).CreateTypography)(self as *const _ as *mut _, typography)
	}
	#[inline]
	pub unsafe fn GetGdiInterop(&self, gdiInterop: *mut *mut IDWriteGdiInterop) -> HRESULT {
		((*self.lpVtbl).GetGdiInterop)(self as *const _ as *mut _, gdiInterop)
	}
	#[inline]
	pub unsafe fn CreateTextLayout(&self, string: *const WCHAR, stringLength: UINT32, textFormat: *mut IDWriteTextFormat, maxWidth: FLOAT, maxHeight: FLOAT, textLayout: *mut *mut IDWriteTextLayout) -> HRESULT {
		((*self.lpVtbl).CreateTextLayout)(self as *const _ as *mut _, string, stringLength, textFormat, maxWidth, maxHeight, textLayout)
	}
	#[inline]
	pub unsafe fn CreateGdiCompatibleTextLayout(&self, string: *const WCHAR, stringLength: UINT32, textFormat: *mut IDWriteTextFormat, layoutWidth: FLOAT, layoutHeight: FLOAT, pixelsPerDip: FLOAT, transform: *const DWRITE_MATRIX, useGdiNatrual: BOOL, textLayout: *mut *mut IDWriteTextLayout) -> HRESULT {
		((*self.lpVtbl).CreateGdiCompatibleTextLayout)(self as *const _ as *mut _, string, stringLength, textFormat, layoutWidth, layoutHeight, pixelsPerDip, transform, useGdiNatrual, textLayout)
	}
	#[inline]
	pub unsafe fn CreateEllipsisTrimmingSign(&self, textFormat: *mut IDWriteTextFormat, trimmingSign: *mut *mut IDWriteInlineObject) -> HRESULT {
		((*self.lpVtbl).CreateEllipsisTrimmingSign)(self as *const _ as *mut _, textFormat, trimmingSign)
	}
	#[inline]
	pub unsafe fn CreateTextAnalyzer(&self, textAnalyzer: *mut *mut IDWriteTextAnalyzer) -> HRESULT {
		((*self.lpVtbl).CreateTextAnalyzer)(self as *const _ as *mut _, textAnalyzer)
	}
	#[inline]
	pub unsafe fn CreateNumberSubstitution(&self, substitutionMethod: DWRITE_NUMBER_SUBSTITUTION_METHOD, localeName: *const WCHAR, ignoreUserOverride: BOOL, numberSubstitution: *mut *mut IDWriteNumberSubstitution) -> HRESULT {
		((*self.lpVtbl).CreateNumberSubstitution)(self as *const _ as *mut _, substitutionMethod, localeName, ignoreUserOverride, numberSubstitution)
	}
	#[inline]
	pub unsafe fn CreateGlyphRunAnalysis(&self, glyphRun: *const DWRITE_GLYPH_RUN, pixelsPerDip: FLOAT, transform: *const DWRITE_MATRIX, renderingMode: DWRITE_RENDERING_MODE, measuringMode: DWRITE_MEASURING_MODE, baselineOriginX: FLOAT, baselineOriginY: FLOAT, glyphRunAnalysis: *mut *mut IDWriteGlyphRunAnalysis) -> HRESULT {
		((*self.lpVtbl).CreateGlyphRunAnalysis)(self as *const _ as *mut _, glyphRun, pixelsPerDip, transform, renderingMode, measuringMode, baselineOriginX, baselineOriginY, glyphRunAnalysis)
	}
}
impl core::ops::Deref for IDWriteFactory {
	type Target = IUnknown;
	#[inline]
	fn deref(&self) -> &IUnknown {
		unsafe { &*(self as *const IDWriteFactory as *const IUnknown) }
	}
}
impl Interface for IDWriteFactory {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0xb859ee5a, Data2: 0xd838, Data3: 0x4b5b, Data4: [0xa2, 0xe8, 0x1a, 0xdc, 0x7d, 0x93, 0xdb, 0x48] }
	}
}
